package com.cjx.starsapisdk.config;

import com.cjx.starsapisdk.client.StarsApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author cjx
 * @description 客户端配置类
 * @createDate 2024/5/6 13:47
 **/
@Data
@Configuration
@ConfigurationProperties("stars.client")
@ComponentScan
public class StarsApiClientConfig {
    private String accessKey;
    private String secretKey;

    @Bean
    public StarsApiClient createStarsApiClient  (){
        return new StarsApiClient(accessKey,secretKey);
    }

}
